<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

abstract class MY_Controller extends CI_Controller {

	protected $_page;
	
	protected function loadLayout() {
		$layout = App::layout();
		$this->_page = $layout->loadLayout($this->router->fetch_class(), $this->router->fetch_method());
		return $this;
	}
	
	protected function renderLayout() {
		$this->_page->render();
		return $this;
	}
	
}

